package com.stenio.fancat.mapper.baby;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.stenio.fancat.domain.baby.BabyRelationship;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BabyRelationshipMapper extends BaseMapper<BabyRelationship> {

    List<BabyRelationship> selectUserListByBabyId(String babyId);

    List<BabyRelationship> selectBabyByUid(String userId);

    BabyRelationship selectBabyByUidAndBid(String userId,String babyId);

    Integer sumKinsfolks(String babyId);

    List<BabyRelationship> selectOwnBaby(String userId);

    List<BabyRelationship> selectOwnBabyList(String userId);

    List<BabyRelationship> selectList(String inviteUserId);

    List<BabyRelationship> selectRelationship(String babyId);

    Integer modifyRelationshipState(String userId,String inviteUserId);

    BabyRelationship selectIfmodifyState(@Param("userId")String userId, @Param("inviteUserId")String inviteUserId);
}
